Skip to content

sipeed-slogic-analyzer: fix channel count and samplerate list#4

Open
heeen wants to merge 1 commit intosipeed:slogic-devfrom
heeen:fix-channel-samplerate-limit
Open

sipeed-slogic-analyzer: fix channel count and samplerate list#4
heeen wants to merge 1 commit intosipeed:slogic-devfrom
heeen:fix-channel-samplerate-limit

Conversation

@heeen
Copy link

@heeen heeen commented Mar 4, 2026

Summary

  • Fix config_channel_set to allow lowering channel count when disabling channels (was >, now !=)
  • Return full samplerate table in config_list instead of truncating based on limit_samplerate

Problem

  • Disabling channels in PulseView never reduced cur_samplechannel, so users couldn't unlock higher sample rates (e.g. 400MHz@8ch, 800MHz@4ch)
  • PulseView queries the rate list before restoring saved channel states, so the truncated list was always stuck at the 16-channel/200MHz limit

Fix

  • config_channel_set: change > to != so channel count tracks enabled channels in both directions
  • config_list(SR_CONF_SAMPLERATE): return all rates; config_set already enforces the per-channel-count limit when a rate is selected

Test plan

  • Connect SLogic 16U3, disable channels D8-D15, verify rates up to 400MHz appear
  • Disable D4-D7 as well, verify rates up to 800MHz appear
  • Re-enable all channels, verify selecting >200MHz gets clamped
  • Start fresh PulseView session with saved 4-channel config, verify full rate list shown

config_channel_set only allowed increasing the channel count (>),
preventing users from lowering it by disabling channels. Change to
!= so disabling channels properly reduces cur_samplechannel and
raises the samplerate limit.

Also return the full samplerate table in config_list instead of
truncating it based on limit_samplerate. PulseView queries the
rate list before channel states are restored, so the truncated
list was always stuck at the 16-channel limit. config_set already
enforces the per-channel-count limit when a rate is selected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant